/**
 * 环境配置封装
 */
const env: Environment = import.meta.env.MODE as Environment;

console.log("env", env);
// 定义环境配置对象
const EnvConfig: EnvConfig = {
  development: {
    baseApi: "/api",
    mockApi: "/api",
  },
  test: {
    baseApi: "//test.futurefe.com/api",
    mockApi:
      "https://www.fastmock.site/mock/c1c302e8baed9894c48c17e4738c092e/api",
  },
  production: {
    baseApi: "/api",
    mockApi:
      "https://www.fastmock.site/mock/c1c302e8baed9894c48c17e4738c092e/api",
  },
};

// 导出配置，正确地合并环境变量和特定环境的配置

// 实现配置对象
const appConfig: AppConfig = {
  env,
  mock: false,
  namespace: "manager",
  ...EnvConfig[env], // 由于env已被断言为正确的类型，这里不需要as keyof
};
export default appConfig;
